package com.ducks;

import com.behaviors.FlyWithWings;
import com.behaviors.Quack;

/**
 * @author SnowmanAndBee
 * @version <version>
 * <description>
 * @date 2021/10/24 - 21:49
 */
public class MallardDuck extends Duck{
    /**
     * 不好的初始化行为
     */
    public MallardDuck() {
        quackBehavior = new Quack();
        flyBehavior = new FlyWithWings();
    }

    @Override
    public void display() {
        System.out.println("I'm a mallard duck!");
    }
}
